//https://leetcode.cn/problems/recursive-mulitply-lcci/

class Solution {
public:
    int multiply(int A, int B) {
        if (B == 1)
        {
            return A;
        }
        if (B == 0)
        {
            return 0;
        }

        return A + multiply(A, B - 1);
    }
};